package com.example.shop_2212.room

import androidx.room.Dao
import androidx.room.Delete
import androidx.room.Insert
import androidx.room.OnConflictStrategy
import androidx.room.Query
import com.example.base.entity.Record

/**
 * 搜素记录的操作
 */
@Dao
interface RecordDao {
    //保存
    @Insert(onConflict = OnConflictStrategy.REPLACE)
    fun insert(record: Record)
    //查询
    @Query("select * from record where phone = :phone")
    fun query(phone:String):MutableList<Record>
    @Delete
    fun delete(record: Record)
}